﻿using DataChangeTools.WebApi.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DataChangeTools.WebApi.DAL.DALs
{
    public class BaseVersionDAL : IBasicsDal<BaseVersionEntity>
    {
        public BaseVersionEntity? GetLastVserionInfoDAL()
        {
            var QueryList = this.GetListByParam(new Dictionary<bool, Dictionary<string, string>>
            {
                {true,new Dictionary<string, string>(){ { "IsEnable", "1" }, { "Platform", "1" } } },
            }).OrderByDescending(t => t.CreateTime);

            if (QueryList == null)
            {
                return null;
            }

            return QueryList.FirstOrDefault();
        }
    }
}
